<template>
	<div style="padding:0px;">
		<el-card class="box-card">
		  <div slot="header" class="clearfix">
		    <span style="line-height: 30px;">汽车及价格信息</span>
		  </div>
		  <div  class="text item">
			  <el-form :model="dialogForm" :label-width="formLabelWidth">
			  	<el-form-item label="汽车品牌" >
			      <el-input v-model="dialogForm.qcsl" auto-complete="off" disabled></el-input>
			    </el-form-item>
			   
			    <el-form-item label="汽车车型" >
			      <el-input v-model="dialogForm.zdj_pz" auto-complete="off" disabled></el-input>
			    </el-form-item>
			    <el-form-item label="外观颜色" >
			      <el-input v-model="dialogForm.qczjg" auto-complete="off" disabled></el-input>
			    </el-form-item>
			    <el-form-item label="内饰颜色" >
			      <el-input v-model="dialogForm.dzje" auto-complete="off" disabled></el-input>
			    </el-form-item>
			    <el-form-item label="上牌城市" >
			      <el-input v-model="dialogForm.qcsl" auto-complete="off" disabled></el-input>
			    </el-form-item>
			    <el-form-item label="有效时间" >
			      <el-input v-model="dialogForm.qckx" auto-complete="off" disabled></el-input>
			    </el-form-item>
			    <el-form-item label="拿车区域" >
			      <el-input v-model="dialogForm.qcys" auto-complete="off" disabled></el-input>
			    </el-form-item>
			    <el-form-item label="期望成交价" >
			      <el-input v-model="dialogForm.zdj_pz" auto-complete="off" disabled></el-input>
			    </el-form-item>
			    
			    <el-form-item label="其他要求"  prop="qczjg">
			      <el-input type="textarea" :rows=3 v-model="dialogForm.qczjg" auto-complete="off" disabled></el-input>
			    </el-form-item>
			  </el-form>
			</div>
		</el-card>
		<el-card class="box-card" style="margin-top:15px;">
		  <div slot="header" class="clearfix">
		    <span style="line-height: 30px;">谁报过价</span>
		  </div>
		  <div  class="text item">
            <el-table :data="gridData">
			    <el-table-column property="name" label="价格" width="150"></el-table-column>
			    <el-table-column property="name" label="车辆所在地" width="200"></el-table-column>
			    <el-table-column property="date" label="有效时间"></el-table-column>
			    <el-table-column property="address" label="联系人"></el-table-column>
			    <el-table-column property="address" label="联系电话"></el-table-column>
			    <el-table-column property="address" label="备注"></el-table-column>
			</el-table>
		   </div>
		</el-card>
	    <div style="text-align:right;margin-top:15px;">
			 <el-button @click="returnBack">返 回</el-button>
			 <!-- <el-button v-if="dialogSendData.isAdd" type="primary" @click="submitConfirmForm('dialogForm')">提 交</el-button> -->
		</div>
	</div>
</template>
<script>
    import agentHttp from '@/utils/agentHttp.js'
	export default{
		created(){
   			if(this.dialogSendData.id!==""){
	      		this.selectData();//修改      	    
	      	}else{	      		
	      		console.log('新增')
	      	}
        },
		props:['dialogSendData','tableData'],
		data(){
			return{
				formLabelWidth:'170px',
				//弹窗或者查看页面信息
		        dialogForm:{
		        	qcsl:"",
		        	carOrder:1,
		        	logisticsCompany:"",
		        	resource:""
		        },
		        gridData: [{
		          date: '2016-05-02',
		          name: '王小虎',
		          address: '上海市普陀区金沙江路 1518 弄'
		        }],
		        logisticsCompanyOptions: [{
		          value: '1',
		          label: '物流'
		        }],
		        //验证规则：
			    rules: {
			        tg_btg: [
			          { required: true, message: '请选择活动区域', trigger: 'change' }
			         /* ,{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }*/
			        ],
			        bz:[
			          {required: true, message: '请填写备注信息', trigger: 'blur'}
			        ]
			    }
			}
		},methods:{
			returnBack(){
				this.dialogSendData.dialogFormVisible=false;
			},
			
		    selectData(){
		        agentHttp.get('adminApi/admin/logistics_info/'+this.dialogSendData.id).then((data)=>{	
		            if(data.success){
		            	this.dialogForm=data.data;
		            	this.dialogForm.destination = this.dialogForm.province+this.dialogForm.city+this.dialogForm.county+this.dialogForm.destination;
		            } 
		        }) 
		    }
		    
		}
	};
	
</script>